package com.example.administrator.printoutindemo;

import org.json.JSONArray;
import org.json.JSONObject;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class OutStorageCheckList implements Serializable {

	private String _proid;
	private String _projectname;
	private String ＿out_storagelist_batchid;
	private String applyUserName; //申请人
	private String receiveUserName; //领料人

	public String getReceiveUserName() {
		return receiveUserName;
	}

	public void setReceiveUserName(String receiveUserName) {
		this.receiveUserName = receiveUserName;
	}

	public String getApplyUserName() {
		return applyUserName;
	}

	public void setApplyUserName(String applyUserName) {
		this.applyUserName = applyUserName;
	}

	// 将JSON对象转化为list
	public List<OutStorageCheckList> getListFromJSON(String JsonStr) {
		List<OutStorageCheckList> clist = new ArrayList<OutStorageCheckList>();

		try {

			JSONArray jay = new JSONArray(JsonStr);// 将字符串转化为JSON数组

			for (int i = 0; i < jay.length(); i++) {
				JSONObject temp = (JSONObject) jay.get(i);

				OutStorageCheckList n = new OutStorageCheckList();

				n.set_proid(temp.getString("proid"));
				n.set_projectname(temp.getString("projectname"));
				n.set＿out_storagelist_batchid(temp.getString("out_storagelist_batchid"));
				n.setApplyUserName(temp.getString("applyUserName"));
				n.setReceiveUserName(temp.getString("receiveUserName"));

				clist.add(n);

			}

		} catch (Exception e) {
			// TODO: handle exception
			e.printStackTrace();
		}

		return clist;

	}

	public String get_proid() {
		return _proid;
	}

	public void set_proid(String _proid) {
		this._proid = _proid;
	}

	public String get_projectname() {
		return _projectname;
	}

	public void set_projectname(String _projectname) {
		this._projectname = _projectname;
	}

	public String get＿out_storagelist_batchid() {
		return ＿out_storagelist_batchid;
	}

	public void set＿out_storagelist_batchid(String ＿out_storagelist_batchid) {
		this.＿out_storagelist_batchid = ＿out_storagelist_batchid;
	}


}